#include<stdio.h>
#include<math.h>
int hannuo(int n,char A,char B,char C)
{
	if(n==1)
	{
		printf("%c->%c\n",A,C);
	}
	else
	{
		hannuo(n-1,A,C,B);
		printf("%c->%c\n",A,C);
		hannuo(n-1,B,A,C);
	}
}
int main(int argc,char *argv[])
{
	int n;
	while(scanf("%d",&n)!=EOF)//
	{
		hannuo(n,'a','b','c');
	}
	return 0;
}
